<div class="modal fade" id="codeModal" tabindex="-1" role="dialog" aria-labelledby="codeModalLabel" aria-hidden="true">
	<div class="modal-dialog" role="document" style="max-width:700px;">
		<div class="modal-content">
			<div class="modal-header">
				<h5 class="modal-title" id="exampleModalLabel">单表生成</h5>
				<button type="button" class="close" data-dismiss="modal" aria-label="Close">
					<span aria-hidden="true">&times;</span>
				</button>
			</div>
			<div class="modal-body">
				<form>
					<div class="form-group">
						<label for="filePath">查询列表数据SQL自定义
							<small class="form-text text-muted" style="display:inline-block;margin-left:20px;">
								请将SQL解析区中指定查询条件替换成如下格式：eg:select * from user where user='${"#"}{userName}'
							</small>
						</label>
						<textarea class="form-control" id="singleSql" rows="5"></textarea>
					</div>
					<div class="form-group">
						<label for="filePath">生成路径</label>
						<input type="text" class="form-control" id="filePath" placeholder="D:\code Space\time-sheet\time-sheet-api\src\main\java" value="路径\项目名称\API工程\src\main\java" >
					</div>
					<div class="form-group">
						<label for="packageName">包名</label>
						<input type="text" placeholder="com.project.package.api" class="form-control" id="packageName" aria-describedby="packageHelp">
						<small id="packageHelp" class="form-text text-muted">默认根据包名生成指定service等路径.</small>
					</div>
					<div class="form-group">
						<label for="bean_id">选择表</label>
						<select id="bean_id" class="form-control" aria-describedby="classHelp">
							<option>--请选择--</option>
						</select>
						<small id="classHelp" class="form-text text-muted">根据指定类名生成相应代码</small>
					</div>
					<div class="form-group">
						<label for="class_bean">类名</label>
						<input type="text" placeholder="eg:t_user_info->UserInfo 默认去掉t_" class="form-control" id="class_bean" aria-describedby="classBean">
						<small id="classBean" class="form-text text-muted">默认会根据表明生成（可修改自定义名称：eg：t_user->User 默认去掉t_).</small>
					</div>
					<div class="form-group" style="position: relative;z-index: 1000;">
						<label for="bean_id_vo">VO</label>
						<div id="search"></div>
						<small id="classHelp" class="form-text text-muted">根据输入页面输入参数生成</small>
					</div>

					<div class="form-group" style="position: relative;z-index: 999;">
						<label for="bean_id_dto">DTO</label>
						<div id="search2"></div>
						<small id="classHelp" class="form-text text-muted">根据输入页面查询返回参数生成</small>
					</div>

					<div class="form-group">
						<label for="httpUrl">请求路径</label>
						<input type="text" placeholder="默认Controller请求前缀/api/自定义值" class="form-control" id="httpUrl" aria-describedby="classBean">
					</div>
					<div class="form-group">
						<div class="form-check form-check-inline">
							<input class="form-check-input" type="checkbox" value="1" name="classType" id="defaultCheck1">
							<label class="form-check-label" for="defaultCheck1">
								*Service.java
							</label>
						</div>
						<div class="form-check form-check-inline">
						<input class="form-check-input" type="checkbox" value="2" name="classType" id="defaultCheck1">
						<label class="form-check-label" for="defaultCheck1">
							*Controller.java
						</label>
						</div>
						<div class="form-check form-check-inline">
						<input class="form-check-input" type="checkbox" value="3" name="classType" id="defaultCheck1">
						<label class="form-check-label" for="defaultCheck1">
							*mapper.java
						</label>
						</div>
						<div class="form-check form-check-inline">
							<input class="form-check-input" type="checkbox" name="classType" value="4" id="defaultCheck1">
							<label class="form-check-label" for="defaultCheck1">
								*mapper.xml
							</label>
						</div>
						<div class="form-check form-check-inline">
						<input class="form-check-input" type="checkbox" name="classType" value="5" id="defaultCheck1">
						<label class="form-check-label" for="defaultCheck1">
							entity
						</label>
						</div>
						<div class="form-check form-check-inline">
							<input class="form-check-input" type="checkbox" name="classType" value="6" id="defaultCheck1">
							<label class="form-check-label" for="defaultCheck1">
								DTO
							</label>
						</div>
						<div class="form-check form-check-inline">
							<input class="form-check-input" type="checkbox"  name="classType" value="7" id="defaultCheck1">
							<label class="form-check-label" for="defaultCheck1">
								Vo
							</label>
						</div>
					</div>
					<div class="form-group">
						<label for="exampleInputEmail1" style="display:block">列表查询条件
							<small class="form-text text-muted" style="display:inline-block;margin-left:20px;">
								根据entity 进行查询条件的生成
							</small></label>
						<div id="selectDiv" class="search-key" style="display:flex;margin-bottom:10px;">
							<select class="form-control" name="filed" id="bean_id_vo" style="width:270px;flex:0 0 270px;margin-right:1%;">

							</select>
							<select class="form-control" name="key" id="" style="width:270px;flex:0 0 270px;margin-right:1%;">
								<option value="">--选择表达式--</option>
								<option value="=">=</option>
								<option value=">">></option>
								<option value="<"><</option>
								<option value=">=">>=</option>
								<option value="<="><=</option>
								<option value="like">like</option>
							</select>
							<div style="flex:0 0 120px;width:120px;">
								<button onclick="plusSelect()" type="button" class="btn btn-primary" style="flex:0 0 40px;"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" class="bi bi-plus" viewBox="0 0 16 16">
										<path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z"/>
									</svg></button>
							</div>
						</div>


					</div>



				</form>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
				<button type="button" id="btn_code_generator" class="btn btn-primary">确认</button>
			</div>
		</div>
	</div>
</div>

<div id="last_template" style="display: none">

</div>

<script id="select_table_template" type="text/x-dot-template">
	<div class="search-key" style="display:flex;margin-bottom:10px;">
		<select name="filed" class="form-control" style="width:270px;flex:0 0 270px;margin-right:1%;">
			<option value="">--选择字段--</option>
			{{~it.data:value:index}}
				<option value="{{= value.name}}">{{= value.name}}</option>
			{{~}}
		</select>
		<select name="key" class="form-control" id="" style="width:270px;flex:0 0 270px;margin-right:1%;">
			<option value="">--选择表达式--</option>
			<option value="=">=</option>
			<option value=">">></option>
			<option value="<"><</option>
			<option value=">=">>=</option>
			<option value="<="><=</option>
			<option value="like">like</option>
		</select>
		<div style="flex:0 0 120px;width:120px;">
			<button onclick="minusSelect(this)" type="button" class="btn btn-primary" style="flex:0 0 40px;margin-right:10px;"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" class="bi bi-dash" viewBox="0 0 16 16">
					<path d="M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8z"/>
				</svg></button>
		</div>
	</div>
</script>
